

(function() {
	tinymce.create('tinymce.plugins.KioskImageLibrary', {
		init : function(ed, url) {
			// Register commands
			ed.addCommand('mceImgLib', function() {
				ed.windowManager.open({
					file : url + '/library.aspx',
					width : 600,
					height : 400,
					inline : 1
				}, {
					plugin_url : url
				});
			});

			// Register buttons
			ed.addButton('kioskImgLib', {
				title : 'Image Library',
				cmd : 'mceImgLib',
				image : url + '/img/image_add.png'
				
			});

    	},

		getInfo : function() {
			return {
				longname : 'Kiosk Image Library',
				author : 'Nick olson',
				authorurl : 'http://www.magenic.com',
				infourl : 'http://www.magenic.com',
				version : tinymce.majorVersion + "." + tinymce.minorVersion
			};
		}
	});

	// Register plugin
	tinymce.PluginManager.add('kioskImgLib', tinymce.plugins.KioskImageLibrary);
})();